<template>
  <view
    class="navibar"
    :style="{ paddingTop: safeAreaInsets!.top + 'px',lineHeight: 120-safeAreaInsets!.top+'rpx'}"
  >
    <view class="left" @tap="back">
      <text class="iconfont icon-xiangzuo"></text>
    </view>
    <view class="right">
      <text class="iconfont icon-sousuo A" @tap="tosearch"></text>
    </view>
  </view>
</template>

<script setup lang="ts">
// 获取屏幕边界到安全区域距离
const { safeAreaInsets } = uni.getSystemInfoSync()
const back = () => {
  uni.navigateBack()
}
const tosearch = () => {
  uni.navigateTo({ url: '/pages/search/search' })
}
</script>

<style lang="scss" scoped>
.navibar {
  height: 120rpx;
  width: 100%;
  // background-color: aqua;
  display: flex;
  justify-content: space-between;
  color: #0b0404;
  padding: 0 10rpx;
  .left {
    height: 100%;
    width: 50rpx;
  }
  .right {
    height: 100%;
    .A {
      margin-right: 35rpx;
    }
  }
}
.iconfont {
  font-size: 40rpx;
}
</style>